<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>try-catch-finally</title>
</head>
<body>
    <script>
   function checkparameter(){
       throw new Error('can\'t be empty')
   }
   function f(x=checkparameter(),y=10,z=20){
       return x+y+z
   }
   try{
       f()
   }catch(e){
       console.log(e);
   }finally{
       
   }
    </script>
</body>
</html>